#!/usr/bin/env python3
# -*- coding:utf-8 -*-

import requests

keyword = 'Python'
url = 'http://www.so.com/s'

try:
    kv = {'q':keyword}
    r = requests.get(url, params=kv)
    r.raise_for_status()
    print(len(r.text))
except:
    print('抓取失败')
